import Vue from "vue";
import VueRouter from "vue-router";
import Layout from "@/layout/Index";
import Welcome from "@/views/welcome/Welcome.vue";
import History from "@/views/users/History.vue";
import Users from "@/views/users/Index.vue";
Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: Layout,
    children: [
      { path: "welcome", alias: "/", component: Welcome },
      { path: "users/history", component: History },
      { path: "users", component: Users },
    ],
  },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
